package com.example.module_main.repository

import com.example.module_main.MainApi
import com.example.module_main.MainModel
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.flow.flow
import kotlinx.coroutines.flow.flowOn
import javax.inject.Inject

class MainRepository @Inject constructor() {
    @Inject
    @MainModel.CommonApi
    lateinit var mainApi: MainApi
    /**
     * 版本更新
     */
    fun checkUpDate() = flow{
        emit(mainApi.appUpdate())
    }.flowOn(Dispatchers.IO)
}